<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<style type="text/css">
		body, html{width: 100%;height: 100%;margin:0;font-family:"微软雅黑";}
		#allmap{height:500px;width:100%;}
		#r-result{width:100%;}
	</style>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=kEFvRxLsZMP1LuappjehN0aA"></script>
	<title>添加/删除覆盖物</title>
</head>
<body>
	<div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
	// 百度地图API功能
	var map = new BMap.Map("allmap"); // 创建地图实例     
	var point = new BMap.Point(139.4064,35.8093); // 创建点坐标     
	map.centerAndZoom(point, 5); // 初始化地图，设置中心点坐标和地图级别    
	
    var myIcon = new BMap.Icon("icon_typhoon.gif", new BMap.Size(20, 20), {
                        offset: new BMap.Size(0,0), // 指定定位位置  
                        imageOffset: new BMap.Size(0,0) // 设置图片偏移  
                 });  
    var marker=new BMap.Marker(point,{icon:myIcon});  
  
    map.addOverlay(marker);  
    
    point = new BMap.Point(136.3964,32.8093); // 创建点坐标 
    
    marker=new BMap.Marker(point,{icon:myIcon});
    
    map.addOverlay(marker);  
    	
    

</script>